<?

	include_once("../functions/functions.php");
	
	$type = $_GET['type'];
	$value = $_GET['value'];
	$message = null;
	
	if (!empty($value)) {
		$sql = "SELECT count(client_id) from er_client WHERE id_reference_no='$value'";
		
		$result = r_db($sql);
		$row = mysql_fetch_array($result);
		if ($row[0] > 0) {
			$message="A client already exists with the entered ID";
		}
		
		echo "showDiv||$message";
	}

?>